package spzx.mapper;

import com.atguigu.spzx.model.entity.product.Category;
import com.atguigu.spzx.model.vo.product.CategoryExcelVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CategoryMapper {

    List<Category> findByParentId(Long parentId);

    Integer countByParentId(Long id);

    List<CategoryExcelVo> findAllCategoryVoList();

    void addCategory(CategoryExcelVo categoryExcelVo);

    void addCategoryList(@Param("categoryExcelVoList") List<CategoryExcelVo> categoryExcelVoList);

    Category getById(Long id);
}
